1. Field of the Invention
The present invention relates to image processing apparatus and method and, more particularly, to character processing apparatus and method for generating a character pattern on the basis of font data in which one character is constructed by a plurality of strokes and is expressed by parameters on a stroke unit basis.
2. Related Background Art
FIG. 21 is a block diagram showing an example of a conventional image processing apparatus.
The image processing apparatus shown in FIG. 21 comprises an outline coordinate generator 11, an outline data generator 12, an address generator 13, an outline buffer 14, a painter 15, and a bit map memory 16.
In the image processing apparatus shown in FIG. 21, an image process is executed as follows. First, outline coordinates are generated by the outline coordinate generator 11 constructed by a CPU and an ROM for storing an outline coordinate generating program from a parameter data group 10 corresponding to one stroke stored in an ROM or a hard disk. The outline data generator 12 constructed by a CPU and an ROM for storing an outline data generating program generates a start point and an end point of painting on the same (y) coordinate as outline data for painting on the basis of the outline coordinates. The address generator 13 constructed by a CPU and an ROM for storing an address generating program generates the (y) coordinate as an address in the outline buffer 14. The start and end points of painting on the same (y) coordinate are stored into addresses in the outline buffer 14 (RAM) generated by the address generator 13. The above operation is executed with respect to the whole one stroke.
The address generator 13 generates a start address and an end address in the bit map memory (RAM) 16 corresponding to the start and end points of painting on the same (y) coordinate stored in the outline buffer 14. The painter 15 constructed by a CPU and an ROM for storing a painting program writes "1" into all of the data between the start and end addresses in the bit map memory 16. The operation is executed with respect to all of the start and end points stored in the outline buffer 14. The series of operations mentioned above are executed with respect to all of the strokes and the OR of bit map data of each stroke is obtained, thereby generating a character.
For example, each of FIGS. 22, 23, and 24 shows a bit map image of outline coordinates of each of strokes constructing a character "H".
FIGS. 25, 26, and 27 are explanatory diagrams showing the contents in the outline buffer 14 on the basis of the outline coordinates of the bit map images. Each diagram shows a table Tb in which data (range data) of a pair of start point (StartX) and end point (EndX) of painting in each (y) coordinate is written.
As shown in FIGS. 28, 29, and 30, every stroke is painted on the basis of the outline data and the OR is sequentially obtained, thereby generating one character on the bit map memory 16.
As mentioned above, FIGS. 22 to 30 show the case where the size of the outline buffer 14 is enough larger than the width in the (y) axial direction of the stroke.
In the case where the size of the outline buffer 14 is insufficient for the width in the (y) axial direction of the stroke and the outline data of one stroke cannot be stored by one operation, as shown in FIGS. 31 to 36, a series of processes (hereinbelow, called a band process) are repeated a plurality of times. For example, FIG. 31 shows a bit map image when the size in the (y) axial direction of the outline buffer 14 is insufficient for the outline coordinates of one of the strokes constructing the character "H".
In this case, the data of the pair of painting start point (StartX) and end point (EndX) in each (y) coordinate in the outline buffer 14 is as shown in FIG. 32. The painting operation is executed on the basis of the outline data as shown in FIG. 33. As shown in FIG. 34, the coordinates in the (y) axial direction of the stroke are shifted. In this case, the data of the pair of start point (StartX) and end point (EndX) of painting in each (y) coordinate in the outline buffer 14 is as shown in FIG. 35. The painting operation is executed on the basis of the outline data as shown in FIG. 36 and the OR is obtained, thereby generating one stroke in the bit map memory 16.
In this case, in the second and subsequent processes, when the start and end points of painting on the same (y) coordinate are stored into the outline buffer 14, a value obtained by subtracting the size in the (y) axial direction in the outline buffer 14 from the (y) coordinate of the start and end points is used as an address.
FIGS. 37 to 42 show an example of the band process with respect to another stroke.
A flow for processes, specifications of the drawings, and the like of FIGS. 37 to 42 are similar to those described with reference to FIGS. 31 to 36.
In the conventional example of FIGS. 37 to 42, however, although the capacity in the (y) axial direction in the outline buffer 14 is sufficient for the width in the (y) axial direction of the stroke, the band process has to be executed and a processing time increases.
As mentioned above, in the case where the outline buffer cannot store the outline data of one stroke by one operation, a number of band processes have to be executed in the conventional technique, so that the processing time increases. There is a problem such that in order to avoid the occurrence of the band process, the outline buffer having a large capacity sufficient for a size of one character is necessary, so that a large memory capacity is necessary.